﻿using System;
using System.Collections.Generic;

using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common.CustomAtteibutes;

namespace Parylene_CVD.Model.DModels
{
    // 用户表实体类
    [Table("User")]
    [PrimaryKey("UserID", autoIncrement = true)]
    public class User
    {
        public int UserID { get; set; }
        public string Username { get; set; } = string.Empty;
        public string Password { get; set; } = string.Empty;
        public string Role { get; set; } = string.Empty;
        public DateTime CreateTime { get; set; }
        public DateTime UpdateTime { get; set; }

        public User() { }

        public User(string username, string password, string role, DateTime createTime, DateTime updateTime)
        {
            Username = username;
            Password = password;
            Role = role;
            CreateTime = createTime;
            UpdateTime = updateTime;
        }

        public User(int userID, string username, string password, string role, DateTime createTime, DateTime updateTime)
        {
            UserID = userID;
            Username = username;
            Password = password;
            Role = role;
            CreateTime = createTime;
            UpdateTime = updateTime;
        }
    }
}
